<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/
//$app->get('/', function () use ($app) {
    //return $app->welcome();
//	return env('DB_HOST');
//});

//$app->get('user/{name:[A-Za-z]+}', function($name) {
//    return 'user/name:'.$name;
//});

//$app->get('user/age', ['middleware'=>'old', function() {
//     return 'User age';
//}]);

// $app->get('user/{id}', 'UserController@showProfile');
// $app->get('user/{id}', function($id){
//     return $id;
// });

//$app->get('admin/profile', function() {
//    return 'admin/profile';
//});

//$app->get('user/profile', ['as' => 'profile', function() {
//    return 'user/profile';
//}]);

// echo route('profile');

// $redirect = redirect()->route('profile');
// $app->get('user/profile1', [
//     'as' => 'profile1', 'uses' => 'UserController@showProfile'
// ]);
//
//test Mysql
$app->get('test/mysql', 'TestController@mysql');
$app->get('test/redis', 'TestController@redis');
$app->get('test/exception', 'TestController@exception');
$app->get('test/log', 'TestController@log');
